package cn.flightcloud.auth.config.spring.security.provider;

import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.oauth2.provider.OAuth2Authentication;

/**
 * oauth2认证provider
 * @author chenjj
 *
 */
public class Oauth2AuthenticationProvider implements AuthenticationProvider{

	@Override
	public Authentication authenticate(Authentication authentication) throws AuthenticationException {
		return null;
	}

	/**
	 * 仅支持oauth2认证
	 */
	@Override
	public boolean supports(Class<?> authentication) {
		return OAuth2Authentication.class.equals(authentication);
	}

}
